@using Blog;
@{
 ModelState.Merge(PageData["ModelState"]);
}
<div>
    <h3>Edit user settings.</h3>
    <div class="error">@Html.ValidationSummary()</div>
    <div class="green">@(new HtmlString(PageData["SuccessMessage"]))</div>
    <form action="" method="POST">  
        <fieldset><legend>Edit user details</legend>
            <table>
                <tbody>
                    <tr>
                        <th><a href="http://en.gravatar.com" target="_blank">Gravatar</a></th>
                        <td>@Gravatar.GetHtml((IsPost?Request.Form["Email"]:PageData["User"].Email), 80)</td>
					</tr>
                    <tr>
                        <th>Display name : </th>
                        <td>@Html.TextBox("DisplayName",(IsPost?Request.Form["DisplayName"]:PageData["User"].DisplayName))</td>
					</tr>
                    <tr>
                        <th>Email : </th>
                        <td>@Html.TextBox("Email",(IsPost?Request.Form["Email"]:PageData["User"].Email))</td>
					</tr>
                    <tr>
                        <th>Bio : </th>
                        <td>@Html.TextArea("Bio",(IsPost?Request.Form["Bio"]:PageData["User"].Bio),new{rows=4,cols=52})</td>
					</tr>
                    <tr>
                        <th>Old password : </th>
                        <td>@Html.Password("OldPassword")</td>
					</tr>
                    <tr>
                        <th>New Password : </th>
                        <td>@Html.Password("NewPassword")</td>
					</tr>
                    <tr>
                        <th>New Confirm Password: </th>
                        <td>@Html.Password("NewPasswordConfirm")</td>
					</tr>
                    <tr>
                        <th></th>
                        <td>@Html.TextBox("Submit","Submit",new{type="Submit"})</td>
					</tr>
				</tbody>
			</table>
		</fieldset>
	</form>
</div>

